<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //展开运算符（拓展运算符）

      //   const arr1 = [1, 2, 3]

      //   const arr2 = [4, 5, 6]

      //   arr1.push(...arr2)

      //   console.log(arr1)

      //   const newArr = [...arr1, ...arr2]

      //   console.log(newArr)

      //   arr1 = [1, 2, 3, ...arr2]

      //   console.log(arr1)

      //   console.log(...arr1)
      //   console.log(1, 2, 3)

      //   console.log(arr)

      //   console.log(Math.max(...arr))

      //   console.log(Math.min(...arr))

      // const fn = function (...arr) {
      //   console.log(...arguments)
      // }

      // fn(1, 2, 3, 4)

      const obj1 = {
        uname: 'harry',
      }

      const obj2 = {
        age: 18,
      }

      const obj3 = {
        ...obj1,
        ...obj2,
      }

      console.log(obj3)
    </script>
  </body>
</html>
